const sm3= require('sm-crypto').sm3


function strToHex(str) {
    var hexCharCode = [];
    
    for (var i = 0; i < str.length; i++) {
      hexCharCode.push(str.charCodeAt(i).toString(16));
    }
    // 记住这里的join一定是空，不要误打了空格
    return hexCharCode.join('');
  }
  
let data = 'zhonghuarenmingongheguowansui';
let key = 'abcdefghj123';

 
let hasData = sm3(data+key, {key:strToHex('abcdefghj123')})
console.log(hasData)
